module.exports = class extends think.Model {
  async getProvinceList(field = true) {
    const data = await this.where({level: 1, upid: 0}).order('id asc').field(field).select();
    return data;
  }

  async getCityList(province_id, field = true) {
    const data = await this.where({level: 2, upid: province_id}).order('id asc').field(field).select();
    return data;
  }

  async getDistrictList(city_id, field = true) {
    const data = await this.where({level: 3, upid: city_id}).order('id asc').field(field).select();
    return data;
  }

  async getCityData3() {

  }
};
